AbortRelinquishFocus
TheAbortRelinquishFocus
method should reestablish this part's ownership of the focus specified in a previous call to this part'sBeginRelinquishFocus
method.
void AbortRelinquishFocus (in ODTypeToken focus, in ODFrame ownerFrame, in ODFrame proposedFrame);
focus
- A tokenized string representing the focus type that was to be relinquished, expressed as a 32-bit value.
ownerFrame
- A reference to a display frame that currently possesses the focus.
proposedFrame
- A reference to a frame that originally requested the focus.
DISCUSSION
Thefocus
parameter must be the tokenized form of one of the focus constants (kODClipboardFocus
,kODKeyFocus
,kODMenuFocus
,kODModalFocus
,kODMouseFocus
,kODScrollingFocus
, orkODSelectionFocus
) or the tokenized form of a part-specific focus type. You can call the session object'sTokenize
method to obtain a token corresponding to one of these constants.A request for a focus set is conditional; if any focus owner is unwilling to relinquish a focus, then none are acquired. Your part's
AbortRelinquishFocus
method should give those focus owners who have indicated willingness to relinquish the focus an opportunity to back out of changes initiated when OpenDoc first called your part'sBeginRelinquishFocus
method. When a request for a focus set fails because one of the focus owners will not relinquish ownership, OpenDoc aborts the request to relinquish all of the foci by calling each part'sAbortRelinquishFocus
method.Your part's
AbortRelinquishFocus
method should return your part to the state where it possessed the focus before continuing to use that focus; how it does this is dependent on your part editor and the type of focus relinquished. Calling this method should have no effect if your part'sBeginRelinquishFocus
method returnedkODFalse
.OVERRIDING
When you subclassODPart
, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrInvalidFrame
- The specified frame is not a display frame of this part.
SEE ALSO
TheODFocusType
type (page 889).
TheODTypeToken
type (page 877).
TheODPart::BeginRelinquishFocus
method (page 482).
TheODPart::CommitRelinquishFocus
method (page 488).
TheODSession::Tokenize
method (page 622).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Relinquishing Foci" on page 208 in OpenDoc Programmer's Guide.
"The AbortRelinquishFocus Method" on page 93 in OpenDoc Cookbook.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help